#include <stdio.h>
#include <string.h>

#include "../rid_fn85.h"

/* define the directory we want to generate our Rid paths in */
#define DAT_DIR "dat/"
/* define the number of characters in DAT_DIR minus the '\0' */
#define DAT_DIR_LEN (sizeof(DAT_DIR) - 1)

/* A type for a string big enough for our path */
typedef char Dir_path[DAT_DIR_LEN + sizeof(Rid_fn85_path)];

int
main(int argc, char *argv[])
{
	Rid id;
	Dir_path dir_path;

	/* create a random rid */
	rid_set(id, NULL);
	/* set the dat/ part of the path */
	strcpy(dir_path, DAT_DIR);
	/* generate the rest of the path */
	rid_fn85_path(dir_path + DAT_DIR_LEN, id);

	/* Now we can do anything we want with dir_path, it's just a string
	 * that looks something like "dat/</L/5E0HTCJ*`tp*(Y;eW)"
	 */

	printf("%s\n", dir_path);

	return 0;
}
